// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ActionTestActivity.cs" company="JDML Consulting Ltd.">
//   Copyright 2011 Photon Project - http://photon.codeplex.com
// </copyright>
// <summary>
//   Defines the ActionTestActivity type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.Testing.Threading
{
    using System;

    public class ActionTestActivity : AsynchronousTestActivity
   {
      #region Fields

      private readonly Action _action;

      #endregion

      public ActionTestActivity(Action action)
      {
         _action = action;
      }

      public override void Execute()
      {
         _action();
         SetCompleted();
      }
   }
}